import { axios } from '@/utils/request'

const api = {
  getLeagueList: '/recharge/league-list',
  getRechargeList: '/recharge/list',
  userRecharge: '/recharge/user-recharge',
  userLeague:'/recharge/user-league'
}

export default api

export function getRechargeList (parameter) {
  return axios({
    url: api.getRechargeList,
    method: 'get',
    params: parameter
  })
}

export function getLeagueList (parameter) {
  return axios({
    url: api.getLeagueList,
    method: 'get',
    params: parameter
  })
}

export function userLeague (parameter) {
  return axios({
    url: api.userLeague,
    method: 'post',
    data: parameter
  })
}

export function userRecharge (parameter) {
  return axios({
    url: api.userRecharge,
    method: 'post',
    data: parameter
  })
}

export function expRechargeList(parameter) {
  return axios({
    url: api.getRechargeList,
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}
